//
//  SJAFNetTool.h
//  Leaf Red Video Player
//
//  Created by 孙健 on 16/3/7.
//  Copyright © 2016年 孙健. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef void(^BlockOfSuccess)(id result);
typedef NS_ENUM(NSUInteger, SJResponseStyle) {
    
    SJJSON,
    SJXML,
    SJDATA,
};

typedef NS_ENUM(NSUInteger, SJRequestStyle) {
    
    SJRequestJSON,
    SJRequestString,
};



@interface SJAFNetTool : NSObject

+(void)GEtNetWithUrl:(NSString *)url WithBody:(id)body headerFile:(NSDictionary *)header response:(SJResponseStyle)responseSytle success:(BlockOfSuccess)success failure:(void (^)( NSError * error))failure;



+(void)POSTNetWithUrl:(NSString *)url WithBody:(id)body bodyStyle:(SJRequestStyle)bodyRequestStyle headerFile:(NSDictionary *)header response:(SJResponseStyle)responseSytle success:(BlockOfSuccess)success failure:(void (^)( NSError * error))failure;

@end
